﻿using System;
using System.Drawing;
using DC2010.Objects.Base;

namespace DC2010.Objects.Data
{
    [Serializable]
    public class MapInfo : BaseInfo
    {
	    /// <summary>
        /// Every map consists of several map floors. Each floor can be understand as one floor in game.
		/// each floor is created with several layers.
        /// </summary>		
        public FloorInfo Floors { get; set; }	
	
        public MapInfo()
        {
            StartPosition = new Point(0, 0);
        }

	    /// <summary>
        /// This is simply a difficulty of a map
        /// </summary>		
        public int LevelMultiplier { get; set; }
        public Point StartPosition { get; set; }

        public int Width { get; set; }
        public int Height { get; set; }

        public MapData CreateData()
        {
            MapData cd = new MapData();

            cd.InfoId = Id;
            cd.Id = cd.InfoId + "_" + Guid.NewGuid().ToString();
            //TODO: fill with other properties
            Root.log.InfoFormat("Core, Created new object with id: {0} based on object {1}", cd.Id, cd.InfoId);
            Root.I.MapSystem.AddData(cd);



            return cd;
        }


    }
}
